home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / MRAC / Toolbox / Misc / append-sublist < prev    next >
Encoding:
Text File  |  1998-08-11  |  580 b   |  15 lines  |  [TEXT/ScoM]

  1. append-sublist sequence
  2.  
  3. Use this function to simplify the output of element-lists into a single multiple list structure. In the example below append-sublist replaces the need for a sequence of car and cdr functions to clear the output of unwanted parentheses.
  4.  
  5. (setq sym
  6.       (mapcar #'(lambda (x)
  7.                     (rotate-f x))
  8.                (pcs :symbol '(4-1 4-4))))
  9. => (((a b c d) (b c d a) (c d a b) (d a b c))
  10.     ((a b c f) (b c f a) (c f a b) (f a b c)))
  11.  
  12. (append-sublist sym)
  13. => ((a b c d) (b c d a) (c d a b) (d a b c)
  14.     (a b c f) (b c f a) (c f a b) (f a b c))
  15.